package asia.hymsk.spring.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author 花于陌上开
 */
public class RegexMatchUtils {
    public static boolean isEmail(String str) {
        String pattern = "\\w[-\\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\\.)+[A-Za-z]{2,14}";

        Pattern r = Pattern.compile(pattern);
        Matcher m = r.matcher(str);
        return m.matches();
    }
}
